<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"
	contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
  <head>
    <title>博客-话题分类</title>
	
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" type="text/css" href="Css/style.css">
    <link rel="stylesheet" type="text/css" href="Css/bootstrap.css">
    <script type="text/javascript" src="Js/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="Js/bootstrap.js"></script>
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
    <link href="umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="umeditor/third-party/jquery.min.js"></script>
    <script type="text/javascript" src="umeditor/third-party/template.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="umeditor/umeditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="umeditor/umeditor.min.js"></script>
    <script type="text/javascript" src="umeditor/lang/zh-cn/zh-cn.js"></script>
  </head>
  
  <body style="background:#EEEFF1;">
    <!-- header start-->
   
	<div class="container-fluid " style="background:#333;height:37px;">
		<div class="row ">
			<div class="col-md-2"></div>
			<div class="col-md-8 text-right" style="padding:8px;">
				<c:choose>
					<c:when test="${sessionScope.flag.equals('ok')}"><span class="label label-danger">你好,${sessionScope.username}</span>|<a
							href="<c:url value='/logoutServlet'/>?value=2" class="label label-primary">注销</a></c:when>
					<c:otherwise>
						<a href="login.jsp"><span class="label label-info">登录</span></a>
						<em>|</em>
						<a href="register.jsp"><span class="label label-info">注册</span></a>
						<em>|</em>
						<a href="find1.html"><span class="label label-info">忘记密码</span></a>
					</c:otherwise>
				</c:choose>
			</div>
			<div class="col-md-2"></div>
		</div>
	</div>

	<div class="container-fluid " style="background:#328555;height:137px;">
		<div class="row ">
			<div class="col-md-2"></div>
			<div class="col-md-8">

				<img src="image/logo.png" style="margin:30px;"/>

			</div>
			<div class="col-md-2"></div>
		</div>
	</div>
	<!-- header end-->
	<!-- navigation start -->
	<div class="container-fluid " style="background:#333;height:62px;">
		<div class="row">
			<div class="col-md-2"></div>
			<div class="col-md-8">

				<ul class="nav nav-pills nav-justified" style="padding:10px;">
					<li role="presentation" class="span"><a href="index。jsp">首页</a></li>
					<li role="presentation" class="span"><a href="notification.html">咨询</a></li>
					<li role="presentation" class="span"><a href="<c:url value='blogServlet'/>">论坛</a></li>
					<li role="presentation" class="span"><a href="#">广播</a></li>
					<li role="presentation" class="span"><a href="#">分组</a></li>
					<li role="presentation" class="span"><a href="<c:url value='/userInfoServlet'/>">个人中心</a></li>
				</ul>

			</div>
			<div class="col-md-2"></div>
		</div>
	</div>
	<!-- navigation ending -->
	<div class="container" style="background:white;">	
		<div class="row " style="height:37px;">
			<div class="col-md-8" style="margin:10px;">
					<a class="glyphicon glyphicon-home span" href=""></a> 
					<em>></em> 
					<a href="blog.jsp" class="span">论坛</a>
					<em>></em>
					<span class="span">论坛分区一</span>
					<em>></em>
					<span class="span">美食天下</span>
			</div>
		</div>

		<div class="row" style="height:5px;background:#EEEFF1;">
			<div class="col-md-8 col-md-offset-2"></div>
		</div>
		
		<div class="row " style="height:37px;">
			<div class="col-md-8 span" style="margin:10px;">
				    <span >美食天下</span>
					<span>今日:</span>
					<em style="color:red;">0</em>
					<em>|</em>
					<span>热度:</span>
					<em class="glyphicon glyphicon-arrow-up" style="color:red;"></em>					
			</div>
			<div class="col-md-3  col-md-push-2 span" style="margin:10px;">
			        <span class="glyphicon glyphicon-stats"></span>
				    <a href="">订阅</a>				
			</div>
		</div>
		
		<div class="row" style="height:2px;background:#EEEFF1;">
			<div class="col-md-8 col-md-offset-2"></div>
		</div>
		
		<div class="row " style="height:80px;">
			<div class="col-md-8 span"  style="margin:20px;">
			  
			    
			     <a class="btn btn-success glyphicon glyphicon-check" href="posting.jsp">发表新帖</a>
			</div>
			<div class="col-md-3 col-md-push-2 span" style="margin:20px;">
			     <a class="btn btn-default glyphicon glyphicon-triangle-left" href="blog.jsp">返回</a>
			</div>
			
		</div>
		
		<div class="row" style="height:2px;background:#328555;">
			<div class="col-md-8"></div>
		</div>
		
	
		
		
		
			
		 
		<div class="row">
		   <div class="col-md-8 span">
		       <a href="<c:url value='/postSortServlet?type=${sessionScope.postlist.datas[0].type}&sort=1'/>">最新</a>
		       <em>|</em>
		       <a href="<c:url value='/postSortServlet?type=${sessionScope.postlist.datas[0].type}&sort=2'/>">热门</a>
		       <em>|</em>
		       <a href="<c:url value='/postSortServlet?type=${sessionScope.postlist.datas[0].type}&sort=3'/>">热帖</a>
		       <em>|</em>		 
		       <a href="<c:url value='/postSortServlet?type=${sessionScope.postlist.datas[0].type}&sort=4'/>">最精</a>      
		   </div>
		</div>
		
		<div class="row">
		   <div class="col-md-12 span">
		        <table class="table table-hover">
		          <c:forEach var="list" items="${sessionScope.postlist.datas }"  >
                     <tr class="active">
						  <td ><img src="image/banner.jpg" class="img-circle img"></td>
						  <td style="padding:30px;"><a href="findReplyServlet?value=list&postId=${list.postId }">${list.title }</a></td>
						  <td style="padding:30px;">
						     <a id="example" data-container="body" data-toggle="popover" data-placement="bottom" data-content="阳光明媚的造成">
						               预览
                             </a>
                          </td>
						  <td style="padding:30px;"><span style="font-size:15px;color:#000000;">${list.poster}</span><br/>${list.time}</td>
						  <td style="padding:30px;"><span>评论量:0</span><br/><span>浏览量：${list.pageView }</span></td>
						  <td style="padding:30px;"><a href="" class="glyphicon glyphicon-share-alt" aria-hidden="true"></a></td>						  					  
					</tr>
				  </c:forEach>
                </table>
		   </div>
		</div>	
		
		
		<div class="row" style="height:2px;background:#EEEFF1;">
			<div class="col-md-8"></div>
		</div>
		<!--分页  -->
		<div class="row">
			<div class="col-md-10"></div>
			<div class="col-md-4">
			   <nav aria-label="Page navigation">
				  <ul class="pager">
				  	<li><a href="<c:url value='/readPostServlet'/>?type=${sessionScope.postlist.datas[0].type}&pc=1">首页</a></li>
				  	<c:if test="${postlist.pc > 1 }">
				    	<li><a href="<c:url value='/readPostServlet'/>?type=${sessionScope.postlist.datas[0].type}&pc=${postlist.pc-1}">上一页</a></li>
				    </c:if>
				    <c:if test="${postlist.pc < postlist.tp }">　
				    	<li><a href="<c:url value='/readPostServlet'/>?type=${sessionScope.postlist.datas[0].type}&pc=${postlist.pc+1}">下一页</a></li>
				   　</c:if>
				   	 <li><a href="<c:url value='/readPostServlet'/>?type=${sessionScope.postlist.datas[0].type}&pc=${postlist.tp}">尾页</a></li>
				  	
				  </ul>
			  </nav>
			</div>
		</div>
		<!-- 分页结束 -->
		<div class="row" style="height:5px;background:#328555;">
			<div class="col-md-8"></div>
		</div>
		
		<div class="row " style="height:37px;">
			<div class="col-md-8" style="margin:10px;">
			   <span>快速发帖</span>
			</div>
		</div>
		
		<div class="row" style="height:3px;background:#EEEFF1;">
			<div class="col-md-8"></div>
		</div>
	    <!-- 富编辑器 -->
		<div class="row">	 
		  <div class="col-md-12">	
		      <br/>     	         
			  <form action="<c:url value="/writePostServlet"/>" method="post" class="form-inline">   
			                               
                 <div class="form-group  has-feedback">
                    
				    <div class="input-group">
				      <span class="input-group-addon">标题</span>
				      <input type="text" class="form-control" id="inputGroupSuccess3" aria-describedby="inputGroupSuccess3Status" required="required">
				    </div>
				    
				 </div>
				 <br/>
				 <br/>
				 <span>分类:&nbsp;&nbsp;&nbsp;&nbsp;</span> <select class="form-control" name="type">
						<option value="1">旅游景点</option>
						<option value="2">美食天下</option>
						<option value="3">居家出行</option>
						<option value="3">旅游住宿</option>
					</select> <br/>   
                 <br/>   
				     <!--style给定宽度可以影响编辑器的最终宽度-->
	             <script type="text/plain" id="myEditor" style="width:1000px;height:200px;">
                     
                 </script>
                 <br/>
                 <input type="submit" value="发表帖子" class="btn btn-primary"/>
	          </form>
	          <br/>
		  </div>
		    
		</div>
	</div>
	<!-- header -->
    <div class="container-fluid " style="background:#333;height:80px;">
	   <div class="row">
			<div class="col-md-2"></div>
			<div class="col-md-8"></div>
			<div class="col-md-2"></div>
	   </div>
    </div>
	<!-- header ending -->
  </body>
  <script type="text/javascript">
   //实例化编辑器
    var um = UM.getEditor('myEditor');
    window.onload=function(){
           
        };
  </script> 
</html>
